﻿using System;

namespace FDEE.Model
{
    public abstract class FootingBase : MemberBase
    {       
        protected eSubType SubType;
        public int Width, Length, Height;
        EFootingType ePCType;
        /// <summary>
        /// 承台基类
        /// </summary>
        /// <param name="typeName"></param>
        /// <param name="pierNumber"></param>
        /// <param name="st">下部结构子类别</param>
        public FootingBase(EFootingType _ePCType,string typeName, string pierNumber, eSubType st, int width, int length, int height) : base(typeName, pierNumber)
        {            
            SubType = st;
            Width = width;
            Length = length;
            Height = height;
            ePCType = _ePCType;
        }

        public override void SetConcreteClass()
        {
            ConcreteClass = eConcreteClass.C35;
        }


        public override void SetConcreteVolume()
        {
            int num = 2;
            double Pi = 3.1415926;
            switch (ePCType)
            {
                case EFootingType.F1PME3:
                    num = 6;
                    break;
                case EFootingType.F2PME3:
                    num = 5;
                    break;
                case EFootingType.FPME41:
                    num = 6;
                    break;
                case EFootingType.FPME42:
                    num = 5;
                    break;
                case EFootingType.FPTM3S:
                    num = 4;
                    break;
                case EFootingType.F1PTM2:
                    num = 2;
                    break;
                case EFootingType.F2PTM2:
                    num = 3;
                    break;
                case EFootingType.F1PTM3:
                    num = 2;
                    break;
                case EFootingType.F2PTM3:
                    num = 3;
                    break;
                case EFootingType.FPM1:
                    num = 4;
                    break;
                case EFootingType.FPTM1:
                    num = 2;
                    break;
                case EFootingType.FPTM1S:
                    num = 3;
                    break;
                case EFootingType.F1PTM1U:
                    num = 2;
                    break;
                case EFootingType.F2PTM1U:
                    num = 3;
                    break;
                case EFootingType.F1PTM1T:
                    num = 2;
                    break;
                case EFootingType.F2PTM1T:
                    num = 3;
                    break;
                case EFootingType.F1PTM2T:
                    num = 2;
                    break;
                case EFootingType.F2PTM2T:
                    num = 3;
                    break;
                case EFootingType.F1PTM3T:
                    num = 2;
                    break;
                case EFootingType.F2PTM3T:
                    num = 3;
                    break;
                case EFootingType.FPE11:
                    num = 2;
                    break;
                case EFootingType.FPE12:
                    num = 2;
                    break;
                case EFootingType.FPE13:
                    num = 2;
                    break;
                case EFootingType.FPE14:
                    num = 2;
                    break;
                case EFootingType.FPE21A:
                    num = 2;
                    break;
                case EFootingType.FPE21B:
                    num = 2;
                    break;
                case EFootingType.FPE22:
                    num = 2;
                    break;
                case EFootingType.FPE31:
                    num = 2;
                    break;
                case EFootingType.FPE32:
                    num = 2;
                    break;
                case EFootingType.FPTE2:
                    num = 2;
                    break;
                case EFootingType.FMHK:
                    num = 0;
                    break;
                default:
                    num = 2;
                    break;
            }
            double value = 0.1 * 0.5 * 0.5 * Pi * num;
            ConcreteVolumn = Height * 0.001 * Length * 0.001 * Width * 0.001-(0.1 * 0.5 * 0.5 * Pi*num); ;
        }
    }



}
